package com.example.demo.service.impl;

import com.example.demo.entity.M001;
import com.example.demo.mapper.PrMapper;
import com.example.demo.service.PrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;

import java.util.List;

public class PrServiceImpl implements PrService {
    @Autowired
    private PrMapper prMapper;

    @Override
    public void pr10101(Model model) {
       List<M001> m001List = prMapper.selectAll();

       if(m001List == null || m001List.size() == 0) {
           model.addAttribute("M001List", "M101001E:顾客编号不存在，请在顾客信息管理增加顾客信息。");
       } else {
           model.addAttribute("m001List", m001List);
       }
    }
 }
